

public class LeilaoFactory {
	
	public static ILeilao getTipoLeilao() {
		
		ILeilao leilao = null;
		ManipuladorProperties propriedade = new ManipuladorProperties();
		
		try {
			ClassLoader leilaoClass = Main.class.getClassLoader();
			Class tipoLeilao = leilaoClass.loadClass(propriedade.carregarPropriedades().getProperty("tipoLeilao"));
			leilao = (ILeilao)tipoLeilao.newInstance();
			
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		}
		return leilao;
	}
	
}
